<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="./../../resources/templates/baseTemplate.xhtml">
    <ui:define name="content">
        <p:fieldset legend="Relatório de Participantes">
            <h:form id="frmParticipantes">
                <!-- Exibição de mensagens gerais -->
                <p:growl id="gMessages" sticky="false" globalOnly="true" />

                <p:panelGrid columns="2">
                    <p:row>
                        <p:messages id="mRelatorioMensagens" redisplay="false"/>
                    </p:row>
                    <p:row>
                        <p:outputLabel value="Evento:" for="somRelatorioEventos"/>
                        <p:selectOneMenu id="somRelatorioEventos" 
                                         value="#{relParticipantesBean.eventoSelecionado}"
                                         required="true"
                                         requiredMessage="Selecione o evento."
                                         effect="fade" converter="#{relParticipantesBean.conversor}"
                                         widgetVar="somEventos">
                            <f:selectItem itemLabel="Selecione um item..." itemValue=""/>
                            <f:selectItems value="#{relParticipantesBean.listaEventos}" 
                                           var="atual" 
                                           itemLabel="#{atual.nmeEvento}" 
                                           itemValue="#{atual}">
                            </f:selectItems>

                        </p:selectOneMenu>
                    </p:row>
                    <p:row>
                        <p:commandButton value="Gerar Relatorio" 
                                         actionListener="#{relParticipantesBean.gerarRelatorio}"
                                         update="@all" ajax="false">
                        </p:commandButton>
                    </p:row>
                </p:panelGrid>
            </h:form>
        </p:fieldset>
    </ui:define>

</ui:composition>
